﻿
  <UserControl x:Class="Lottery.Client.SL.Controls.UserList"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
	xmlns:System="clr-namespace:System;assembly=mscorlib" 
    xmlns:local="clr-namespace:Lottery.Client.SL.Controls"
    xmlns:System_Windows_Controls_Primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls"	
    mc:Ignorable="d"
    d:DesignHeight="600" d:DesignWidth="712" BorderThickness="1" Foreground="White" VerticalAlignment="Top">

    <UserControl.Resources>
        <Style x:Key="NewRegularPolygonStyle1" TargetType="ed:RegularPolygon">
            <Setter Property="Fill" Value="#7FFFFFFF"/>
            <Setter Property="Stroke" Value="#CCFFFFFF"/>
            <Setter Property="PointCount" Value="3"/>
            <Setter Property="Width" Value="6"/>
            <Setter Property="Height" Value="6"/>
            <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
            <Setter Property="RenderTransform">
                <Setter.Value>
                    <CompositeTransform Rotation="90"/>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Canvas x:Name="RightNewContent" Height="616" Width="712">
            <Rectangle Fill="#99414141" Height="616" RadiusY="5" RadiusX="5" Stroke="#4CFFFFFF" Width="712"/>
            <Rectangle Height="603" Canvas.Left="6" RadiusY="5" RadiusX="5" Stroke="#19FFFFFF" Canvas.Top="7" Width="700">
                <Rectangle.Fill>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#99686868"/>
                        <GradientStop Color="#67232323" Offset="1"/>
                        <GradientStop Color="#8B0D0E0D" Offset="0.278"/>
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <Canvas x:Name="NewList" Width="690" Height="588" Canvas.Left="11" Canvas.Top="13">
                <Rectangle Height="35" Stroke="#0CFFFFFF" Width="690">
                    <Rectangle.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FF4B4D4E"/>
                            <GradientStop Color="#FF2F3233" Offset="0.989"/>
                        </LinearGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <Button x:Name="btAddLower" Content="添加会员" Style="{StaticResource buttonStyle0}" Width="75" FontSize="14" Canvas.Left="610" d:LayoutOverrides="Height" Canvas.Top="7"/>
                <TextBlock Height="24" TextWrapping="Wrap" Text="会员列表" Width="80" Foreground="#CCF5FF95" FontSize="15" FontFamily="Verdana" Canvas.Left="304" Canvas.Top="7"/>
                <StackPanel x:Name="NewSPanel" Orientation="Vertical" Width="690" Height="588">
                    <Grid x:Name="ShowDistillDetail" Margin="2">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="25"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border BorderBrush="Black" BorderThickness="1" Grid.Row="1">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF6E6E6E" Offset="0"/>
                                    <GradientStop Color="Black" Offset="1"/>
                                    <GradientStop Color="#FF494949" Offset="0.5"/>
                                    <GradientStop Color="#FF202020" Offset="0.565"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <local:NavControl x:Name="navControl" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="12"/>
                        </Border>
                        <Grid x:Name="gridList" Grid.Row="2">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <sdk:DataGrid x:Name="dgList" CellStyle="{StaticResource DataGridCellStyle_Report}" ColumnHeaderStyle="{StaticResource DataGridColumnHeaderStyle_DealStart}" RowStyle="{StaticResource DataGridRowStyle_Report}" IsReadOnly="True" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserSortColumns="False" AutoGenerateColumns="False" HorizontalGridLinesBrush="Black" VerticalGridLinesBrush="#FF666666" RowBackground="#FF323232" GridLinesVisibility="Vertical" Background="Black" AlternatingRowBackground="#FF262626" HeadersVisibility="Column">
                                <sdk:DataGrid.Columns>
                                    <sdk:DataGridTemplateColumn Header="序号">
                                        <sdk:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" MouseLeftButtonUp="LowerPlayListUserName_Click" Cursor="Hand" TextDecorations="Underline" />
                                            </DataTemplate>
                                        </sdk:DataGridTemplateColumn.CellTemplate>
                                    </sdk:DataGridTemplateColumn>
                                    <sdk:DataGridTemplateColumn Header="用户名" Width="92">
                                        <sdk:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" MouseLeftButtonUp="LowerPlayListUserName_Click" Text="{Binding Name}" Cursor="Hand" TextDecorations="Underline" ToolTipService.ToolTip="{Binding NickName}" />
                                            </DataTemplate>
                                        </sdk:DataGridTemplateColumn.CellTemplate>
                                    </sdk:DataGridTemplateColumn>
                                    <sdk:DataGridTemplateColumn Header="类型" Width="50">
                                        <sdk:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding UserTypeName}" Foreground="{Binding UserTypeBrush}" Margin="2" />
                                            </DataTemplate>
                                        </sdk:DataGridTemplateColumn.CellTemplate>
                                    </sdk:DataGridTemplateColumn>
                                    <sdk:DataGridTemplateColumn Header="返点%" Width="60">
                                        <sdk:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <TextBlock Text="{Binding BackPct,StringFormat=\{0:0.00%\}}" Margin="0,0,10,0" />
                                                    <Image Name="imgArrowUp" Source="../images/arrowup.png" HorizontalAlignment="Right" VerticalAlignment="Center" Stretch="None" Visibility="Collapsed" />
                                                </Grid>
                                            </DataTemplate>
                                        </sdk:DataGridTemplateColumn.CellTemplate>
                                    </sdk:DataGridTemplateColumn>
                                    <sdk:DataGridTextColumn Binding="{Binding Balance, StringFormat=\{0:F2\}}" Header="余额" CellStyle="{StaticResource DataGridCellStyle_Number}" Width="74" />
                                    <sdk:DataGridTextColumn Binding="{Binding Freeze, StringFormat=\{0:F2\}}" Header="冻结金额" CellStyle="{StaticResource DataGridCellStyle_Number}" Width="73" />
                                    <sdk:DataGridTextColumn Binding="{Binding LastLoginTime}" Header="最后登录" Width="132"/>
                                    <sdk:DataGridTemplateColumn Header="状态" Width="46">
                                        <sdk:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding StatusName}" Foreground="{Binding StatusBrush}" Margin="2" />
                                            </DataTemplate>
                                        </sdk:DataGridTemplateColumn.CellTemplate>
                                    </sdk:DataGridTemplateColumn>
                                    <sdk:DataGridTemplateColumn Header="在线" Width="48">
                                        <sdk:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <local:OnlineStatusControl OnlineStatus="{Binding OnlineStatus}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="21" Height="21" />
                                            </DataTemplate>
                                        </sdk:DataGridTemplateColumn.CellTemplate>
                                    </sdk:DataGridTemplateColumn>
                                    <sdk:DataGridTemplateColumn Header="操作" Width="78">
                                        <sdk:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal">
                                                    <Button Name="btChange" Content="修改" Style="{StaticResource buttonStyle0}" Click="EditLower_Click" Margin="2" Width="30" Height="20" />
                                                    <Button Name="btLock" Style="{StaticResource buttonStyle0}" Click="LockLower_Click" Visibility="Collapsed"  Margin="2" Width="30" Height="20" />
                                                </StackPanel>
                                            </DataTemplate>
                                        </sdk:DataGridTemplateColumn.CellTemplate>
                                    </sdk:DataGridTemplateColumn>
                                </sdk:DataGrid.Columns>
                            </sdk:DataGrid>
                            <Grid Grid.Row="1" Background="#FF4A4A4A">
                                <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Margin="2" Orientation="Horizontal">
                                    <Button x:Name="btSearchList" Style="{StaticResource ButtonStyle_Search}" Margin="2"/>
                                    <Button x:Name="btRefreshList" Style="{StaticResource ButtonStyle_Refresh}" Margin="2"/>
                                </StackPanel>
                                <sdk:DataPager x:Name="dpList" PageSize="20" HorizontalAlignment="Right" Background="Black" VerticalAlignment="Center" />
                            </Grid>
                        </Grid>
                    </Grid>
                </StackPanel>
            </Canvas>
        </Canvas>
        <Grid x:Name="gridLoading" Grid.Row="2" Background="#7F000000">
            <Border x:Name="border_Processing" VerticalAlignment="Center" BorderBrush="White" BorderThickness="1" HorizontalAlignment="Center" Background="#FF323232" CornerRadius="2">
                <StackPanel Margin="5">
                    <TextBlock x:Name="lbWaiting" TextWrapping="Wrap" Foreground="#FFB7B7B7" Margin="5" HorizontalAlignment="Center"/>
                    <ProgressBar x:Name="progressBarLoading" Height="10" Width="150" IsIndeterminate="True"/>
                </StackPanel>
            </Border>
        </Grid>
    </Grid>
</UserControl>
